Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove get_val in serialization #1587

Merged
merged 2 commits into from
Oct 4, 2022
Merged

remove get_val in serialization #1587

merged 2 commits into from
Oct 4, 2022

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Oct 4, 2022

remove get_val in serialization and mark as unimplemented!()
replace get_val with iter in linear codec
remove MultivalueStartIndexRandomSeeker
replace MultivalueStartIndexIter with closure
Sample 100 values in linear codec
remove Mutexes

remove get_val in serialization and mark as unimplemented!()
replace get_val with iter in linear codec
remove MultivalueStartIndexRandomSeeker
replace MultivalueStartIndexIter with closure
Sample 100 values in linear codec
.collect::<Vec<_>>();
let limit_num_vals = column.num_vals().min(100_000);

let num_samples = 100;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the step_by solution.

Can you change the column.num_vals() limit above to 100 too, to make proofreading even easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, 100 instead of 100_000?

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2022

Codecov Report

Merging #1587 (0f5cff7) into main (44e0379) will decrease coverage by 0.03%.
The diff coverage is 90.36%.

@@            Coverage Diff             @@
##             main    #1587      +/-   ##
==========================================
- Coverage   93.79%   93.75%   -0.04%     
==========================================
  Files         251      251              
  Lines       46329    46278      -51     
==========================================
- Hits        43456    43390      -66     
- Misses       2873     2888      +15     
Impacted Files Coverage Δ
src/fastfield/writer.rs 87.45% <0.00%> (-1.27%) ⬇️
src/indexer/doc_id_mapping.rs 97.74% <ø> (-0.02%) ⬇️
src/indexer/sorted_doc_id_column.rs 95.00% <33.33%> (-3.81%) ⬇️
src/indexer/sorted_doc_id_multivalue_column.rs 95.58% <33.33%> (-4.42%) ⬇️
src/fastfield/multivalued/writer.rs 98.36% <93.75%> (-1.64%) ⬇️
fastfield_codecs/src/lib.rs 99.36% <100.00%> (ø)
fastfield_codecs/src/line.rs 99.25% <100.00%> (+0.06%) ⬆️
fastfield_codecs/src/linear.rs 98.72% <100.00%> (+0.01%) ⬆️
src/indexer/merger.rs 98.82% <100.00%> (-0.02%) ⬇️
src/schema/document.rs 92.81% <0.00%> (-1.31%) ⬇️
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment on lines +258 to +261
if old_doc == u32::MAX {
// sentinel value for last offset
return offset;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't doing the chain below do the same thing?

 doc_id_map
        .iter_old_doc_ids()
        .map(move |old_doc| { ... })
        .chain(iter::once(offset))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would, but offset is already owned by the closure

Copy link
Collaborator

@fulmicoton fulmicoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments inline

@PSeitz PSeitz merged commit 4cf911d into main Oct 4, 2022
@PSeitz PSeitz deleted the no_get_val_in_serialize branch October 4, 2022 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants